package dao;

import entity.User;
import org.apache.ibatis.annotations.Param;
import param.UserParam;

import java.util.List;

/**
 * @author 石小俊
 * @date 2023年07月19日 11:02
 */
public interface UserDao {

    void insertUser(User user);

    User selectById(Integer id);

    List<User> selectAll();

    void updateUser(User user);

    void deleteById(Integer id);

    void insertUser2(User user);

    List<User> selectAll2();
    List<User> selectAll3();

    User selectByUsernameAndPassword(UserParam param);
    User selectByUsernameAndPassword2(User param);
    User selectByUsernameAndPassword3(String username,String password);

    User selectByUsernameAndPassword4(@Param("username") String username, @Param("password") String password);

    List<User> selectByUsername(String username);
    List<User> selectByUsername2(String username);
    List<User> selectByUsername3(User userParam);


    void insertReturnPrimaryKey(User user);

    List<User> selectByUsernameAndPassword5(@Param("username") String username, @Param("password") String password);
    List<User> selectByUsernameAndPassword6(@Param("username") String username, @Param("password") String password);

    List<User> selectByParams(User user);
    List<User> selectByParams2(User user);
    List<User> selectByParams3(User user);
    List<User> selectByParams4(User user);

    void updateUser2(User user);
    void updateUser3(User user);

    List<User> selectByIds(List<Integer> ids);
}
